/*
题目链接 : https://leetcode.cn/problems/row-with-maximum-ones/description/?envType=daily-question&envId=2025-03-22
*/

//题解代码 :

class Solution {
public:
    vector<int> rowAndMaximumOnes(vector<vector<int>>& mat) {
        int row = 0, cnt = 0;
        int n = mat.size(), m = mat[0].size();
        for(int i=0;i<n;++i){
            int cnt1 = 0;
            for(int j=0;j<m;++j){
                cnt1 += mat[i][j];
            }
            if(cnt1>cnt){
                row = i, cnt = cnt1;
            }
        }
        return {row,cnt};
    }
};
